package mine.broadcast;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import mine.activity.Alarm;

public class AlarmReceiver extends BroadcastReceiver {
        @Override  
        public void onReceive(Context context, Intent intent) {
            Intent i = new Intent(context, Alarm.class);
            Long id = intent.getLongExtra("id",0);
            i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);//这一句很重要，不然会出错
            i.putExtra("id",id);
            context.startActivity(i);
        }  
    }  